Northwind Test with Yukon

Order Subtotals View

Owner

dbo

Creation Date

10-07-2003 10:31:36

Remarks


Columns

NameTypeLengthIsNullableCollation
OrderIDint4 
Subtotalmoney8 

View Definition

create view "Order Subtotals" AS
SELECT "Order Details".OrderID, Sum(CONVERT(money,("Order Details".UnitPrice*Quantity*(1-Discount)/100))*100) AS Subtotal
FROM "Order Details"
GROUP BY "Order Details".OrderID